package com.zfzs.post.modules.agent.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @author ck
* @date 2019-09-05
*/
@Entity
@Data
@Table(name="agent_withdraw_pwd")
public class AgentWithdrawPwd implements Serializable {

    // 主键
    @Id
    @Column(name = "id")
    private Long id;

    // 密码随机盐值
    @Column(name = "salt")
    private String salt;

    // 密码
    @Column(name = "pwd")
    private String pwd;

    // 创建日期
    @Column(name = "create_time")
    private Timestamp createTime;

    // 修改时间
    @Column(name = "update_time")
    private Timestamp updateTime;

    public void copy(AgentWithdrawPwd source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}